<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <title>{$site_name}</title>
    <!-- CSS -->
    <link rel="stylesheet" href="{url:#css/materialize.min.css}"/>
    <link rel="stylesheet" href="{url:#css/me.css}"/>
    <link rel="stylesheet" href="{url:#css/iconfont.css}"/>

    <style type="text/css">
        /**去除绿色下划线 - 开始*/
        input::-webkit-input-placeholder {
            color: #7e7e7e;
            text-indent: 5px;
        }

        input:not([type]), input[type=text], input[type=password], input[type=email], input[type=url], input[type=time], input[type=date], input[type=datetime-local], input[type=tel], input[type=number], input[type=search], textarea.materialize-textarea {
            background-color: transparent;
            border: none;
            border-radius: 0;
            outline: none;
            height: 1.5em;
            width: 100%;
            font-size: 1rem;
            margin: 0;
            padding: 0;
            box-shadow: none;
        }

        input:not([type]):focus:not([readonly]), input[type=text]:focus:not([readonly]), input[type=password]:focus:not([readonly]), input[type=email]:focus:not([readonly]), input[type=url]:focus:not([readonly]), input[type=time]:focus:not([readonly]), input[type=date]:focus:not([readonly]), input[type=datetime-local]:focus:not([readonly]), input[type=tel]:focus:not([readonly]), input[type=number]:focus:not([readonly]), input[type=search]:focus:not([readonly]), textarea.materialize-textarea:focus:not([readonly]) {
            border-bottom: none;
            box-shadow: none
        }

        /**去除绿色下划线 - 结束*/
        .q-ltitle {
            height: 37px;
            line-height: 37px;
            vertical-align: middle;
            font-family: "微软雅黑";
            font-size: 16px;
            text-align: center;
        }
    </style>
    <!-- JS -->
    <script src="{url:#js/jquery-1.11.3.min.js}"></script>
    <script src="{url:#js/materialize.min.js}"></script>
    <script src="{url:#js/home/register.js}"></script>
    <script src="{url:#js/yang_check.js}"></script>
</head>
<body class="q-body">
<!-- TitleBar 开始 -->
<div class="navbar-fixed">
    <nav>
        <div class="nav-wrapper red accent-4 valign-wrapper">
            <ul class="left" id="nav-btn-left">
                <li><a href="{url:/mobile/user_center}"><i class="iconfont">&#xe63c;</i></a></li>
            </ul>
            <span class="title-bar-size center_align">申请代理</span>
            <ul class="right">
                <li><a class="disabled" style="visibility:hidden"><i class="iconfont">&#xe63c;</i></a></li>
            </ul>
        </div>
    </nav>
</div>
<!-- TitleBar 结束 -->

<div class="container" style="padding-top: 30px;">
	{if:!empty($sq_obj)}
	<div class="q-reg-box">
	<table>
		<tr>
			<td colspan="2"></td>
		</tr>
		<tr>
			<td class="q-rltitle">上次申请时间</td>
			<td class="q-hult"><span class="q-hut">{$sq_obj['sq_time']}</span></td>
		</tr>
		
		<tr>
			<td class="q-rltitle">申请类型</td>
			<td class="q-hult"><span class="q-hut">{echo:Common::getShenfenName($sq_obj['sq_lx'])}</span></td>
		</tr>
		<tr>
			<td class="q-rltitle">审核时间</td>
			<td class="q-hult"><span class="q-hut">{$sq_obj['sh_time']}</span></td>
		</tr>
		<tr>
			<td class="q-rltitle">状态</td>
			<td class="q-hult"><span class="q-hut">
				{if:$sq_obj['is_ok']==0}
					审核中
				{elseif:$sq_obj['is_ok']==1}
					已通过
				{elseif:$sq_obj['is_ok']==2}
					已拒绝
				{/if}
			</span></td>
		</tr>
		<tr>
			<td colspan="2"  class="q-kru"><div class="divider"></div></td>
		</tr>
		</table>
	</div>
    {/if}  

        

        
        
        <div class="row">
            <div class="col s4 q-ltitle">当前身份：</div>
            <div class="col s7">
            		<span class="q-ltitle">
                	{if:$mobile_user['u_lx']==0}
						普通会员
					{elseif:$mobile_user['u_lx']==1}
						服务中心
					{elseif:$mobile_user['u_lx']==2}
						分公司
					{/if}
					</span>
            </div>
        </div>
        <div class="row">
            <div class="col s4 q-ltitle">申请类型：</div>
            <div class="col s7">
                <select class="browser-default" name="lx" id="lx" style="margin-left:-10px;">
					<option value="1">服务中心</option>
					<option value="2">分公司</option>
                </select>
            </div>
        </div>
        
        <div class="center clearfix" style="margin-right:10px; margin-left:10px;margin-top:60px;">
        
        <input type="hidden" id="user_id" name="user_id" value="{$mobile_user[id]}"/>
            <input type="button" id="btn_sub" value="提交申请" onclick="sub()" class="waves-effect waves-light btn-large red z-depth-0 login_btn"/>
        </div>
    
</div>


<script type="text/javascript">
function sub()
{
	var lx = parseInt($("#lx").val());
	var user_id = $("#user_id").val();
	if(user_id != '')
	{
		$("#btn_sub").attr('disabled', true);
		$.post("{url:/mobile/agent_add}",{lx:lx},function(result){
			
			if(result['status']=='success')
			{
				yang_alert(result['msg']);
				document.location.href = document.location.href;
			}
			else
			{
				yang_alert(result['msg']);
				$("#btn_sub").attr('disabled', false);
			}
		},'json');
	}
}


</script>
</body>
</html>
